package com.lib.common;

public class Constant {
    //返回的状态码
    public static final Integer JSON_STATE_SUCCESS = 1000; // 正常请求
    //非1000的状态码，表示请求有错误
    public static final Integer JSON_STATE_SERVICE_ERROR = -1; //service(持久层)异常


    public static final Integer JSON_STATE_IS_LOGIN = 2001; // 用户名可否登陆
    public static final Integer JSON_STATE_LOGIN = 2002; // 用户名可否登陆
    public static final Integer JSON_STATE_EMPTY_ARGUMENT = 2011 ;  // 空参数
    public static final Integer JSON_STATE_INVALID_ARGUEMENT = 2012 ;  // 无效参数
    public static final Integer JSON_STATE_IS_NOT_OLD_PWD = 2004 ;  // 旧密码异常

    public static final Integer JSON_STATE_SERVICE_UPDATE = 3001; // service更新异常
    public static final Integer JSON_STATE_SERVICE_DELETE = 3002; // service删除异常
    public static final Integer JSON_STATE_SERVICE_INSERT = 3003; // service插入异常


    public static final Integer JSON_STATE_RECORD_NOT_FOUND = 4001; // 记录不存在
    public static final Integer JSON_STATE_RECORD_IS_FOUND = 4002; // 记录已存在


    public static final Integer JSON_STATE_IS_NOT_MULTPART = 5001; //表单格式不能上传文件
    public static final Integer JSON_STATE_FILE_UPLOAD = 5002; //上传文件异常
    public static final Integer JSON_STATE_FILE_IN_VALID = 5003; //上传文件异常


    public static final Integer USER_ROLE = 0;
    public static final Integer ADMIN_USER = 1;


    public static final String SESSION_USER="user"; // Session中保存用户信息的key
    public static final String SESSION_ADMIN="admin"; // Session中保存管理员信息的key

}
